<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>学校填报</title>
<link href="/styles/style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
	$(function() {

		$("input").attr("readonly", "readonly");
		$("#edit").click(function() {

			$("input").removeAttr("readonly");
			$("#first").focus();
		});
		$("#save").click(function() {

			$("input").attr("readonly", "readonly");

 			alert("保存成功");

		});
		
		$("#submit").click(function(){
			var sid = ${school.sid};
			var flag = confirm("确定要提交么?提交后不可修改");
			if (flag == true) {

				window.location.href = "/school/noedit?sid=" + sid+"&state=1";
			} 
		});

		$("#delete").click(function() {

			var flag = confirm("确定要删除该记录么？");
			var sid = ${school.sid};
			if (flag == true) {

				window.location.href = "/school/schooldelete?sid=" + sid;
			} 
		});
	});
</script>
</head>
<body>

	<form:form action="/school/schooledit" modelAttribute="s" method="post">
		<table class="table11" style="width: 80%; line-height: 25px;">

			<tr>
				<th style="text-align: right;">所属机构</th>
				<th>中北大学教务处</th>
				<th style="text-align: right;">所属辖区</th>
				<th>尖草坪区</th>
				<th style="text-align: right;">状态</th>
				<th>填报</th>
			</tr>
			<tr>
				<td style="text-align: center;" colspan="6">学校建设类</td>
			</tr>
			<tr>
				<td align="right">学生用餐座位数</td>
				<td><input type="text"
					value="${school.eatSeats }" name="eatSeats" id="first" /></td>
				<td align="right">图书馆藏书数量</td>
				<td><input type="text" value="${school.lBooks }" name="lBooks" /></td>
				<td align="right">报纸订阅数</td>
				<td><input type="text" value="${school.newspapers }"
					name="newspapers" /></td>
			</tr>

			<tr>
				<td align="right">阅览室座位数</td>
				<td><input type="text" value="${school.lSeats }" name="lSeats" /></td>
				<td align="right">教师用台式机数量</td>
				<td><input type="text" value="${school.tComputers }"
					name="tComputers" />/台</td>
				<td align="right">教师用笔记本数量</td>
				<td><input type="text" value="${school.tNotebooks }"
					name="tNotebooks" />/台</td>
			</tr>
			<tr>
				<td align="right">学校自有产权建筑面积</td>
				<td colspan="2"><input type="text" value="${school.allArea }"
					name="allArea" />/m^2</td>
				<td align="right">主校区自有产权建筑面积</td>
				<td colspan="2"><input type="text" value="${school.mainArea }"
					name="mainArea" />/m^2</td>
			</tr>
			<tr>
				<td style="text-align: center;" colspan="6">学校资金类</td>
			</tr>
			<tr>
				<td align="right">地方生均预算内拨款标准</td>
				<td colspan="2"><input type="text" value="${school.sStandard }"
					name="sStandard" />/万</td>
				<td align="right">教学仪器设备总值</td>
				<td colspan="2"><input type="text"
					value="${school.equipments }" name="equipments" />/万</td>
			</tr>
			<tr>
				<td align="right">负债总额</td>
				<td colspan="2"><input type="text" value="${school.sMoney }"
					name="sMoney" />/万</td>
				<td align="right">货款总额</td>
				<td colspan="2"><input type="text" value="${school.equMoney }"
					name="equMoney" />/万</td>

			</tr>
			<tr>
				<td align="right">填报人</td>
				<td colspan="2"><input type="text" value="${school.checkPer }"
					name="checkPer" /></td>
				<td align="right">填报时间</td>
				<td colspan="2"><input type="text" value="${school.sdate }"
					name="sdate" /></td>
			</tr>

			<tr>
				<td align="right">区县意见</td>
				<td colspan="5"><c:choose>
						<c:when test="${school.xCheckstate=='-1'}">
												未审核		
											</c:when>

						<c:when test="${school.xCheckstate=='1'}">
							<font color="green">审核通过</font>
						</c:when>

						<c:when test="${school.xCheckstate=='2'}">
							<font color="red">未通过审核</font>
						</c:when>
					</c:choose></td>
			</tr>
			<tr>
				<td align="right">市意见</td>
				<td colspan="5"><c:choose>
						<c:when test="${school.cCheckstate=='-1'}">
												未审核		
											</c:when>

						<c:when test="${school.cCheckstate=='1'}">
							<font color="green">审核通过</font>
						</c:when>

						<c:when test="${school.cCheckstate=='2'}">
							<font color="red">未通过审核</font>
						</c:when>
					</c:choose></td>
			</tr>
			<tr>
				<td align="right">结果</td>
				<td colspan="5"><c:choose>
						<c:when test="${empty school.checkComment}">
												无		
											</c:when>
						<c:otherwise>${school.checkComment }</c:otherwise>
					</c:choose></td>
			</tr>

			<tr>
				<td colspan="6" align="center"><label> <input
						type="submit" class="btn" value="保存" id="save" /> &nbsp;&nbsp;<input
						type="button" value="修改" class="btn" id="edit" />&nbsp;&nbsp;<input
						type="button" value="提交" class="btn" id="submit" />&nbsp;&nbsp; <input
						type="button" class="btn" value="删除" id="delete" /> &nbsp;&nbsp;<input
						type="button" class="btn" onmouseover="changebg(this,'1')"
						onmouseout="changebg(this,'1')" value="返 回"
						onclick="javascript:history.go(-1);" />
				</label></td>
			</tr>
		</table>
		<input type="hidden" value="${school.sid }" name="sid" /><input
			type="hidden" value="-1" name="userid" /> <input
			type="hidden" value="${school.xCheckstate }" name="xCheckstate" /> <input
			type="hidden" value="${school.cCheckstate }" name="cCheckstate" /> <input
			type="hidden" value="${school.checkComment }" name="checkComment" /><input
			type="hidden" value="1" name="checkComment" />
	</form:form>
</body>
</html>